package jicheng;

//方法重写

class phone {
    public void call(String name) {
        System.out.println("给" + name + "打电话");
    }
}

class newphone extends phone{
    public void call(String name){
        //System.out.println("给"+name+"打电话");
        super.call(name);
        System.out.println("发短信");
    }
}

public class extendsDemo04 {
    public static void main(String[] args) {
        newphone n = new newphone();
        n.call("魏钟利");
    }
}
